	<layout name="newlayout" />
		<script src="__JS__jquery.form.js" type="text/javascript"></script>
		 <script type="text/javascript" charset="utf-8" src="__JS__ueditor.config.js"></script>
								    <script type="text/javascript" charset="utf-8" src="__JS__ueditor.all.min.js"> </script>
							    <script type="text/javascript" charset="utf-8" src="__JS__lang/zh-cn/zh-cn.js"></script>
	<STYLE>
   .clear {  clear: both;   }
	.input_class{width:15px;height:10px;}
.num{margin: 0 5px 0 0;padding: 3px 6px;color: #57a000;text-decoration: none;border: 1px solid #ddd;-webkit-border-radius: 4px;border-radius: 4px;}
.current{margin: 0 5px 0 0;padding: 3px 6px;color: #57a000;text-decoration: none;border: 1px solid #ddd;-webkit-border-radius: 4px;border-radius: 4px;background: #469400 url('{__IMG__}bg-button-green.gif') top left repeat-x !important;border-color: #459300 !important;color: #fff !important;}
.star{color:red;}
#main-content{width:100%;}
.content-box{width:1000px;margin:0 auto;}
	</STYLE>
	<div id="main-content"  style=""> 
			<div class="content-box" style="">
				<div class="content-box-header">
					<h3>职位>
				<?php if(empty($data['title'])){echo '新增';}else{ echo $data['title'];}?>
					</h3>
					<div class="clear"></div>
				</div>
				<div class="content-box-content">
					<div>
					<div class="notification attention png_bg"  >
							<a href="#" class="close"><img src="__IMG__cross_grey_small.png" title="Close this notification" alt="close" /></a>
							<div >
								提示：<span class="star">&nbsp;&nbsp;*&nbsp;&nbsp;</span>为必填，其他选填！
							</div>
						</div>
<!-- 						缩略图上传 -->
						<style>
	                     .upload-img-thumb{width:100%;position: relative;}
	                     .upload-img-thumb1{position: absolute;left:70%;border:1px solid #eee;border-top:2px solid #eec;-webkit-border-radius: 6px;border-radius: 6px;}
						.upload-img-thumb2{margin: 0 auto; width: 167px; margin-bottom: 20px;}
	                     #img_preview{width: 167px; height: 125px;}
	                     #file_upload{margin:0 auto;}
						</style>
							<div class="upload-img-thumb"></div>
							<div class="upload-img-thumb1">
							<div class="upload-img-thumb2">
								<img  <?php if($data['thumb']){?>src="<?=$data['thumb'] ?>" <?php }else{?> src="__IMG__images.jpg" <?php }?>  id="img_preview">
							</div>
							<div style="width: 100%;">
									<div class="col-lg-6" style="width:100%;">
										<div class="input-group" >
													<input id="file_upload" name="thumb" type="file" multiple="true">
										</div>
										<div style="width:90px;margin:0 auto;">
										<a href="javascript:$('#file_upload').uploadify('cancel')" class="button" >删除</a>
										<a href="javascript:$('#file_upload').uploadify('upload')" class="button" style="">上传</a>
										</div>
									</div>
							</div>
							</div>
								<script type="text/javascript">
								    $(function() {
								        $('#file_upload').uploadify({
								       	 'auto'     : false,
								            'swf'      : '/Public/js/uploadify.swf',    //指定上传控件的主体文件
								            'uploader' : '/admin/logining/imgUpload',    //指定服务器端上传处理文件
								            'onUploadSuccess' : function(file, data, response) {
								                $("#img_preview").attr("src",data);
								 	 			$("#thumb").val(data);
								            }
								        });
								    });
								</script>
<!-- 							end 缩略图上传 -->
						<form action="/admin/recruitment/index" method="post" id="article_add" >
							<input type="hidden"  name="id" value="{$data['id']}" />
							<input type="hidden" name="thumb"  value="{$data['thumb']}"  id="thumb"/>
							<fieldset> 
							<p><?php echo getJqDete();?>
							有效期：<input  size="12" readonly class="text-input   datepicker" type="text"  name="valid"   value="{$data['valid']}"/> 
							</p>
								<p>
										职位：<span class="star">*</span>&nbsp;<input class="text-input small-input not_null" type="text"  name="title" value="{$data['title']}" /> <span class="input-notification  png_bg">Successful message</span> <!-- Classes for input-notification: success, error, information, attention -->
								</p>
								<p>
									
										  	待遇：<input class="text-input "  type="text"  name="pay"  value="{$data['pay']}" /> 
										  	 	招聘人数：<input class="text-input  "   size="12" type="text"  name="num"  value="{$data['address']}"/>
										  	 	</p>
										  	 	<p>
										  	 		<label>	地点：</label>       
										  	 	  	<input class="text-input  "   size="12" type="text"  name="address"  value="{$data['address']}"/>
										  	 	</p>
								<p>
								<label>	备注：</label>       
								<input class="text-input medium-input " type="text"  name="remark"   value="{$data['remark']}"/> 
								</p>
								
						
									<label><span class="star">*</span>&nbsp;要求：</label>        
								
								<script id="container" name="content" type="text/plain">
																{$data['content']}
									</script>
									<script type="text/javascript">
									    var editor = UE.getEditor('container')
									</script>
								<p>
									<input class="button" type="button" value="保存"  id="tijiao" onclick="save();" />
								</p>
							</fieldset>
							<div class="clear"></div>
						</form>
					</div> 
				</div> 
			</div> 
		</div> 
<script>
//提交表单
$(function(){
						//表单检查是否为空
						$(".not_null").blur(function(){
							var obj=$(this).find("+span");
								 if($(this).val()==""){
									 obj.removeClass("success");
									 obj.addClass("error");
									 obj.html("不能为空！");
									 $("#tijiao").attr("disabled","disabled"); 
								 } else{
									 obj.removeClass("error");
									 obj.addClass("success");
									 $("#tijiao").removeAttr("disabled"); 
								 }
						});
	
});
//选择文件
$(function(){
	$("#img_file").change(function(){
		var url=$(this).val();
		if(/[.](jpg|gif|bmg)$/.test(url)){
				$("#img_url").val(url);
		}else{
			alert("图片格式不正确");
			$(this).val("");
			$("#img_url").val("");
		}
	});
});
	//上传图片
	function img_upload(){
		 $("#div_fg").slideToggle("slow");
		$("#showDataForm").ajaxSubmit(function(message) { 
			 $("#div_fg").slideToggle("slow");
			$("#img_preview").attr("src",message);
			$("#thumb").val(message);
			});
	};

	  function save(){
	      $("#article_add").submit();
	    }
</script>